using System; using System.Text; using System.Text.RegularExpressions; using System.Collections.Generic; IField Section0 = Document.Sections[0]; if (Section0 == null) { FCTools.ShowMessage("Section0 is null"); } IField foundTable = Section0.Field("Keyword Search"); if (foundTable == null) { FCTools.ShowMessage("\"Keyword Search\" field not found"); return; } // Show or hide "Keyword Search" hits. for (int targetIndex = 0; targetIndex < 100; targetIndex++) { if ( !foundTable.HasField("Target" + targetIndex) ) break; IField fldTarget = foundTable.Field("Target" + targetIndex); fldTarget.IsVisible = !string.IsNullOrEmpty(fldTarget.Text); }